{include file="header.htm" /}
<script type="text/javascript" src="__PUBLIC__/plugins/colpick/js/colpick.js"></script>
<link href="__PUBLIC__/plugins/colpick/css/colpick.css" rel="stylesheet" type="text/css"/>
<style>
#picker {border:solid 1px ff6565;width:70px;height:20px;border-right:40px solid green;}
</style>
<body class="bodystyle" style="overflow-y: scroll; cursor: default; -moz-user-select: inherit;">
<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    {include file="bar.htm" /}
    <form class="form-horizontal" id="post_form" action="{:weapp_url('Monkmenu/Monkmenu/index')}" method="post">
        <div class="ncap-form-default">
            <dl class="row">
                <dt class="tit">
                    <label>功能</label>
                </dt>
                <dd class="opt">
                    <div class="onoff">
                        <label for="is_open1" class="cb-enable {if condition='!isset($row.is_open) || $row.is_open eq 1'}selected{/if}">开启</label>
                        <label for="is_open0" class="cb-disable {if condition='isset($row.is_open) && $row.is_open eq 2'}selected{/if}">关闭</label>
                        <input id="is_open1" name="is_open" value="1" type="radio" {if condition="!isset($row.is_open) || $row.is_open eq 1"} checked="checked"{/if}>
                        <input id="is_open0" name="is_open" value="2" type="radio" {if condition="isset($row.is_open) && $row.is_open eq 2"} checked="checked"{/if}>
                    </div>                    
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="uname">主题颜色</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="theme_color" value="{$row.theme_color|default='#798088'}" id="picker" style="border-color: {$row.theme_color|default='#798088'};" />
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="sort_order">展示设置</label>
                </dt>
                <dd class="opt">
                    <label><input type="radio" name="is_sys" value="0" {if !isset($row.is_sys) || empty($row.is_sys)}checked{/if}>全部</label>&nbsp;&nbsp;&nbsp;&nbsp;
                    <label><input type="radio" name="is_sys" value="1" {if isset($row.is_sys) && $row.is_sys==1}checked{/if}>手机端</label>&nbsp;&nbsp;&nbsp;&nbsp;
                    <label><input type="radio" name="is_sys" value="2" {if isset($row.is_sys) && $row.is_sys==2}checked{/if}>电脑端</label>&nbsp;&nbsp;&nbsp;&nbsp;
                    <label><input type="radio" name="is_sys" value="3" {if isset($row.is_sys) && $row.is_sys==3}checked{/if}>关闭</label>&nbsp;&nbsp;&nbsp;&nbsp;
                    <span class="err"></span>
                    <p class="notic2">移动端：底部导航栏</p>
                    <p class="notic2">PC端：右侧边栏</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="sort_order">返回顶部</label>
                </dt>
                <dd class="opt">                    
                    <label><input type="radio" name="is_back" value="1" {if !isset($row.is_back) || $row.is_back==1}checked{/if}>显示</label>&nbsp;&nbsp;&nbsp;&nbsp;                
                    <label><input type="radio" name="is_back" value="0" {if isset($row.is_back) && empty($row.is_back)}checked{/if}>隐藏</label>&nbsp;&nbsp;&nbsp;&nbsp;
                    <span class="err"></span>                    
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="sort_order">顶部展示设置</label>
                </dt>
                <dd class="opt">                    
                    <label><input type="radio" name="is_top" value="1" {if !isset($row.is_top) || $row.is_top==1}checked{/if}>显示</label>&nbsp;&nbsp;&nbsp;&nbsp;                
                    <label><input type="radio" name="is_top" value="0" {if isset($row.is_top) && empty($row.is_top)}checked{/if}>隐藏</label>&nbsp;&nbsp;&nbsp;&nbsp;
                    <span class="err"></span>
                    <p class="notic2">移动端</p>
                </dd>
            </dl>            
            <dl class="row" id="tel_box" {if !isset($row.is_sys) || $row.is_sys==1} style="display:block;" {/if}>
                <dt class="tit">
                    <label for="tel_tips">电话文案</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="tel_tips" placeholder="24小时免费服务热线" id="tel_tips" value="{$row.tel_tips|default='24小时免费服务热线'}" class="input-txt">
                    <span class="err"></span>
                    <p class="notic2">如：24小时免费服务热线</p>
                </dd>
            </dl>
            <dl class="row" id="tel_box2" {if !isset($row.is_sys) || $row.is_sys==1} style="display:block;" {/if}>
                <dt class="tit">
                    <label for="tel_font_size">文案字体大小</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="tel_font_size" placeholder="" id="tel_font_size" value="{$row.tel_font_size|default='1rem'}" class="input-txt">
                    <span class="err"></span>
                    <p class="notic2">如：24小时免费服务热线->字体大小</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="logo_local">微信二维码</label>
                </dt>
                <dd class="opt">
                    <div class="input-file-show div_logo_local">
                        <span class="show">
                            <a id="img_a_local" class="nyroModal" rel="gal" href="javascript:void(0);"  onmouseout="layer.close(layer_tips);" target="_blank">
                                <i id="img_i_local" class="fa fa-picture-o"></i>
                            </a>
                        </span>
                        <span class="type-file-box">
                            <input type="text" id="logo_local" name="logo_local" value="{$row.logo_local}" class="type-file-text" autocomplete="off">
                            <input type="button" name="button" id="button1" value="选择上传..." class="type-file-button">
                            <input class="type-file-file" onClick="GetUploadify(1,'','allimg','img_call_back')" size="30" hidefocus="true" nc_type="change_site_logo" title="点击前方预览图可查看大图，点击按钮选择文件并提交表单后上传生效">
                        </span>
                    </div>
                    <!-- <input type="text" id="logo_remote" name="logo_remote" value="" placeholder="http://" class="input-txt" style="display: none;">
                    &nbsp;
                    <label><input type="checkbox" name="is_remote" id="is_remote" value="1" onClick="clickRemote(this, 'logo');">远程图片</label>
                    <span class="err"></span>
                    <p class="notic">建议尺寸 88 * 31 (像素) 的gif或jpg文件</p> -->
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="wechat_name">微信昵称</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="wechat_name" value="{$row.wechat_name}" id="wechat_name" class="input-txt">
                    <span class="err"></span>
                    <p class="notic2">留空不显示</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="phone">电话/手机</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="phone" placeholder="" value="{$row.phone}" id="phone" class="input-txt">
                    <span class="err"></span>
                    <p class="notic2">留空不显示</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="kf_url">客服链接</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="kf_url" placeholder="" value="{$row.kf_url}" id="kf_url" class="input-txt">
                    <span class="err"></span>
                    <p class="notic2">如：百度番茄/53KF等客服链接</p>
                    <p class="notic2">留空不显示</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="nav_font_size">导航文字大小</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="nav_font_size" id="nav_font_size" value="{$row.nav_font_size|default='14px'}" class="input-txt">
                    <span class="err"></span>
                    <p class="notic2">移动端底部字体大小</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="nav_height">导航高度</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="nav_height" id="nav_height" value="{$row.nav_height|default='1rem'}" class="input-txt">
                    <span class="err"></span>
                    <p class="notic2">移动端底部字体大小</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="nav_bottom">导航离底部高度</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="nav_bottom" id="nav_bottom" value="{$row.nav_bottom|default='.5rem'}" class="input-txt">
                    <span class="err"></span>
                    <p class="notic2">移动端底部字体大小</p>
                </dd>
            </dl>
            <div class="bot" style="margin-top:25px;">                
                <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    $(document).ready(function() {
        // 监听name为"gender"的radio组
        $('input[name="is_top"]').change(function() {
            var selectedValue = $('input[name="is_top"]:checked').val();
            if(selectedValue==1){
                $('#tel_box,#tel_box2').css('display','block');
            }else{
                $('#tel_box,#tel_box2').css('display','none');
            }
        });
        // 颜色选择
        $('#picker').colpick({
            flat:false,
            layout:'rgbhex',
            submit:0,
            colorScheme:'light',
            color:$('#picker').val(),
            onChange:function(hsb,hex,rgb,el,bySetColor) {
                $(el).css('border-color','#'+hex);
                // Fill the text box just if the color was set using the picker, and not the colpickSetColor function.
                if(!bySetColor) $(el).val('#'+hex);
            }
        }).keyup(function(){
            $(this).colpickSetColor('#'+this.value);
        });        
    });    
    // 判断输入框是否为空
    function checkForm(){
        if($('input[name=theme_color]').val() == ''){
            showErrorMsg('主题颜色不能为空！');
            $('input[name=theme_color]').focus();
            return false;
        }
        layer_loading('正在处理');
        $('#post_form').submit();
    }
    function img_call_back(fileurl_tmp)
    {
        $("#logo_local").val(fileurl_tmp);
        $("#img_a_local").attr('href', fileurl_tmp);
        $("#img_i_local").attr('onmouseover', "layer_tips=layer.tips('<img src="+fileurl_tmp+" class=\\'layer_tips_img\\'>',this,{tips: [1, '#fff']});");
    }

</script>
{include file="footer.htm" /}